package com.chanjiedata.changbs.adapter;

import android.content.Context;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.chanjiedata.changbs.R;
import com.chanjiedata.changbs.proto.Mystock;

import java.util.List;

/**
 * 文件名 : ProgressAdapter
 * 创建者 : MangoWang
 * 创建日期 : 2019/11/25 11:50
 * 微信 : MangoWaWang
 * 邮箱 : 763482205@qq.com
 * 描述 : TODO
 */

public class MyAllocaLogAdapter extends BaseQuickAdapter<Mystock.allocationLogList.List, BaseViewHolder> {
    public MyAllocaLogAdapter(Context context, List<Mystock.allocationLogList.List> dataList) {
        super(R.layout.item_alloca_log, dataList);
    }

    @Override
    protected void convert(BaseViewHolder helper, Mystock.allocationLogList.List item) {

        helper.setText(R.id.tv_allot_people, item.getMemberInitiator())
                .setText(R.id.tv_phone, item.getRecipientMobile())
                .setText(R.id.tv_time, item.getEquipmentTime())
                .setText(R.id.tv_be_alloc, item.getRecipientName());
        if (item.getIsType().equals("0")) {
            helper.setText(R.id.tv_get_money, "未付款");
//            tvGetMoney.setTextColor(Color.parseColor("#FFA500"));
        } else {
            helper.setText(R.id.tv_get_money, "已付款");
//            tvGetMoney.setTextColor(Color.parseColor("#FFA500"));
        }

    }
}